/*
 * =============================================================================
 *       Copyright (c) 2006 Vilaumedia. Todos los derechos reservados.
 * =============================================================================
 */
package corp.edu.amadeus.core.business.object.impl;

import corp.edu.amadeus.core.business.object.ifc.IPersistable;
import org.apache.log4j.Logger;
import corp.edu.amadeus.core.business.object.ifc.IBaseBO;



/**
 * Esta clase es la base para todos los objetos de negocio en el sistema.
 *
 * @author Eduardo Perrino.
 *
 * <br>$HeadURL:$
 * <br>$LastChangedDate:${date}
 * <br>$LastChangedRevision:$
 * <br>$LastChangedBy:$
 */
public abstract class BaseBO implements IBaseBO {



    /** El logger. */
    private static Logger log = Logger.getLogger(BaseBO.class);

    /**
     * Metodo equals por defecto.
     *
     * @param obj el objecto a comparar.
     * @return true si el objecto es igual.
     * @see java.lang.Object#equals(java.lang.Object)
     */
    public boolean equals(Object obj) {
        IPersistable other = (IPersistable) obj;
        return this.getPersistenceId() == other.getPersistenceId();
    }

    /**
     * Metodo hashcode por defecto.
     *
     * @return el hashcode del objecto.
     * @see java.lang.Object#hashCode()
     */
    public int hashCode() {
        return this.getPersistenceId();
    }

}
